home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr47 / sch250.zip / RELSTART.PRG < prev    next >
Text File  |  1995-02-12  |  7KB  |  211 lines

  1. *****
  2. * Real Estate demo system
  3. * Note: The palette may have changed since the last procedure. Be
  4. * aware that some of the color numbers may be different from other 
  5. * procedures. 
  6. *****
  7. mvpcspeed1=gete("PCSPEED1")
  8. mvpcspeed2=gete("PCSPEED2")
  9. *****
  10. * Open real estate file and jump to top
  11. *****
  12. if .not. is_open("property")
  13.     open("property","",.t.,"property")
  14. else
  15.     fselect("property")
  16. endif
  17. jumpto("top")
  18. *****
  19. * Set graphics and build screen
  20. *****
  21. graphmode(2)
  22. imgpcx("wl1vga16.pcx",0,0,"flash")
  23. graphcolor(1)
  24. graphbox("SOLID",5,5,634,35)
  25. imgsay(01,21,14,15,-1,"","SCHOONER Real Estate Brokerage Services")
  26. graphcolor(8)
  27. imgiconbox(05,30,634,66,15,7,8,"etched")
  28.  
  29. imgiconbox(09,34,73,62,15,7,8,"raised")
  30. imgsay(03,03,14,1,-1,"","FILE")
  31.  
  32. imgiconbox(75,34,139,62,15,7,8,"raised")
  33. imgsay(03,10,14,1,-1,"","OPTIONS")
  34.  
  35. imgiconbox(141,34,205,62,15,7,8,"raised")
  36. imgsay(03,19,14,1,-1,"","HELP?")
  37.  
  38. imgiconbox(250,34,314,62,15,7,8,"raised")
  39. imgsay(03,33,14,1,-1,""," <<  ")
  40.  
  41. imgiconbox(316,34,380,62,15,7,8,"raised")
  42. imgsay(03,41,14,1,-1,""," >>  ")
  43.  
  44. imgiconbox(320,70,633,284,15,7,8,"raised")
  45. imgiconbox(05,261,318,475,15,7,8,"raised")
  46.  
  47. *****
  48. * Define menu arrays
  49. *****
  50. public mvfile[2]
  51. mvfile[1]="Print "
  52. mvfile[2]="End Demo"
  53.  
  54. public mvoptions[1]
  55. mvoptions[1]="Home List"
  56.  
  57. public mvhomelist[property->(reccount())+1]
  58.  
  59. do while .t.
  60.     mvchoice=1
  61.     mvrecno=1
  62.     mvoldrecno=1
  63.     *****
  64.     * Display home exterior & plan
  65.     *****
  66.     imgpcx(alltrim(property->imgview),325,75,"scroll")
  67.     imgpcx(alltrim(property->imgplan),10,266,"scroll")
  68.  
  69.     *****
  70.     * Display home description
  71.     *****
  72.     imgiconbox(05,70,318,259,15,7,8,"etched")
  73.     imgsay(06,09,14,1,-1,"","Description "+property->name)
  74.     mvdescript=property->descript
  75.     mvcount=mlcount(mvdescript,35)
  76.     mvscreen=iif(mvcount<=15,mvcount,15)
  77.     mvline=0
  78.     mvtoprow=6
  79.     do while mvline<=mvscreen
  80.         mvline=mvline+1
  81.         mvtext=memoline(mvdescript,35,mvline)
  82.         imgsay(mvtoprow+mvline,3,14,1,-1,"",mvtext)
  83.     enddo
  84.  
  85.     imgiconbox(320,286,633,475,15,7,8,"etched")
  86.     imgsay(21,53,14,1,-1,"","Specifications")
  87.     imgsay(23,43,14,1,-1,"","    Area: "+alltrim(property->area)+" Sq Feet")
  88.     imgsay(25,43,14,1,-1,"","   Rooms: "+alltrim(property->rooms)+" Bedrooms")
  89.     imgsay(27,43,14,1,-1,"","   Baths: "+property->baths)
  90.     imgsay(29,43,14,1,-1,"","Lot Size: "+alltrim(property->lotsize)+" Sq Feet")
  91.     imgsay(31,43,14,1,-1,"","Township: "+property->township)
  92.  
  93.     do while .t.    
  94.         *****
  95.         * Process mouse event
  96.         *****
  97.         mscrsoron()
  98.         mswait(val(mvpcspeed1))
  99.         mscrsoroff()
  100.         if msinside(09,34,73,62)  
  101.             ***** FILE MENU *****
  102.             imgiconbox(09,34,73,62,15,"",8,"etched")        
  103.             imgiconbox(09,34,73,62,15,"",8,"raised")
  104.             imgsave(09,63,100,116,53,"filemenu")
  105.             mvchoice=imgmenubox(09,63,100,112,"mvfile",14,15,7,0,val(mvpcspeed2))
  106.             mscrsoroff()
  107.             if mvchoice=0
  108.                 imgrestore(09,63,100,116,53,"filemenu",0)
  109.                 mvchoice=1
  110.                 loop
  111.             endif
  112.             if upper(alltrim(mvfile[mvchoice]))="PRINT"
  113.                 imgrestore(09,63,100,116,53,"filemenu",0)
  114.                 *****
  115.                 * Print the screen
  116.                 *****
  117.                 ***** Confirm box *****
  118.                 imgsave(220,140,420,240,10,"relprn")
  119.                 imgiconbox(220,140,420,240,7,15,0,"raised")
  120.                 imgsay(11,29,14,0,-1,""," Printing  screen  to")
  121.                 imgsay(12,29,14,0,-1,""," HP Laserjet on LPT1:")
  122.                 imgiconbox(240,205,304,229,7,8,0,"raised")
  123.                 imgiconbox(336,205,400,229,7,8,0,"raised")
  124.                 imgsay(15,31,14,14,-1,"","  OK  ")
  125.                 imgsay(15,43,14,14,-1,"","CANCEL")
  126.                 mscrsoron()
  127.                 mswait(val(mvpcspeed1))
  128.                 mscrsoroff()
  129.                 if msinside(336,205,400,229) 
  130.                     *****
  131.                     * Cancel print
  132.                     *****
  133.                     imgiconbox(336,205,400,229,7,"",0,"etched")
  134.                     imgiconbox(336,205,400,229,7,"",0,"raised")
  135.                     imgrestore(220,140,420,240,10,"relprn",0)
  136.                     loop
  137.                 endif
  138.                 if msinside(240,205,304,229) 
  139.                     *****
  140.                     * Print
  141.                     *****
  142.                     imgiconbox(240,205,304,229,7,"",0,"etched")
  143.                     imgiconbox(240,205,304,229,7,"",0,"raised")
  144.                     ***** swap to hplaserjet screen print driver ***** 
  145.                     imgrestore(220,140,420,240,10,"relprn",0)
  146.                     mvswap="hpljprn 300 1 1 6 4"
  147.                     swap(mvswap)
  148.                 endif
  149.             endif
  150.             if upper(alltrim(mvfile[mvchoice]))="END DEMO"
  151.                 imgrestore(09,63,100,116,53,"filemenu",0)
  152.                 return
  153.             endif
  154.         endif
  155.         if msinside(75,34,139,62) 
  156.             ***** OPTIONS MENU *****
  157.             imgiconbox(75,34,139,62,15,"",8,"etched")
  158.             imgiconbox(75,34,139,62,15,"",8,"raised")
  159.             imgsave(75,63,167,105,42,"optmenu")
  160.             mvchoice=imgmenubox(75,63,167,91,"mvoptions",14,15,7,0,val(mvpcspeed2))
  161.             mscrsoroff()
  162.             if mvchoice=0
  163.                 imgrestore(75,63,167,105,42,"optmenu",0)
  164.                 mvchoice=1
  165.                 loop
  166.             endif
  167.             if upper(alltrim(mvoptions[mvchoice]))="HOME LIST"
  168.                 fselect("property")
  169.                 imgrestore(75,63,167,105,42,"optmenu",0)
  170.                 imgsave(100,50,540,270,220,"homelist")
  171.                 mvoldrecno=recno()
  172.                 mv_udfname="dbflist"
  173.                 imglistbox(100,50,540,270,2,1,15,8,8,0) 
  174.                 mscrsoroff()
  175.                 imgrestore(100,50,540,270,220,"homelist",0) 
  176.                 if empty(mvrecno) .or. mvrecno=mvoldrecno
  177.                     jumpto(mvoldrecno)
  178.                     mscrsoron()
  179.                 else
  180.                     exit
  181.                 endif
  182.             endif
  183.         endif
  184.         if msinside(141,34,205,62) 
  185.             ***** HELP MENU *****
  186.             imgiconbox(141,34,205,62,15,"",8,"etched")
  187.             imgiconbox(141,34,205,62,15,"",8,"raised")
  188.             imgsave(320,10,639,470,460,"helpscrn")
  189.             mv_udfname="helplist"
  190.             imglistbox(320,10,639,470,2,1,15,8,8,0) 
  191.             mscrsoroff()
  192.             imgrestore(320,10,639,470,460,"helpscrn",0) 
  193.         endif
  194.         if msinside(250,34,314,62) 
  195.             ***** BACK ARROW *****
  196.             imgiconbox(250,34,314,62,15,"",8,"etched")
  197.             imgiconbox(250,34,314,62,15,"",8,"raised")
  198.             skipto(-1,"property")
  199.             exit
  200.         endif
  201.         if msinside(316,34,380,62) 
  202.             ***** FORWARD ARROW *****
  203.             imgiconbox(316,34,380,62,15,"",8,"etched")
  204.             imgiconbox(316,34,380,62,15,"",8,"raised")
  205.             skipto(1,"property")
  206.             exit
  207.         endif
  208.     enddo
  209. enddo
  210. return
  211.